\(\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx\) [74]
Optimal result
Integrand size = 45, antiderivative size = 165 \[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {(a (A c-c C+B d)+b (B c-(A-C) d)) x}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {\left (A b^2-a (b B-a C)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{\left (a^2+b^2\right ) (b c-a d) f}-\frac {\left (c^2 C-B c d+A d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{(b c-a d) \left (c^2+d^2\right ) f}
\]
[Out]
(a*(A*c+B*d-C*c)+b*(B*c-(A-C)*d))*x/(a^2+b^2)/(c^2+d^2)+(A*b^2-a*(B*b-C*a))*ln(a*cos(f*x+e)+b*sin(f*x+e))/(a^2
+b^2)/(-a*d+b*c)/f-(A*d^2-B*c*d+C*c^2)*ln(c*cos(f*x+e)+d*sin(f*x+e))/(-a*d+b*c)/(c^2+d^2)/f
Rubi [A] (verified)
Time = 0.31 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.99, number
of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.044, Rules used = {3732, 3611}
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {x (a (A c+B d-c C)-b d (A-C)+b B c)}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {\left (A b^2-a (b B-a C)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{f \left (a^2+b^2\right ) (b c-a d)}-\frac {\left (A d^2-B c d+c^2 C\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{f \left (c^2+d^2\right ) (b c-a d)}
\]
[In]
Int[(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2)/((a + b*Tan[e + f*x])*(c + d*Tan[e + f*x])),x]
[Out]
((b*B*c - b*(A - C)*d + a*(A*c - c*C + B*d))*x)/((a^2 + b^2)*(c^2 + d^2)) + ((A*b^2 - a*(b*B - a*C))*Log[a*Cos
[e + f*x] + b*Sin[e + f*x]])/((a^2 + b^2)*(b*c - a*d)*f) - ((c^2*C - B*c*d + A*d^2)*Log[c*Cos[e + f*x] + d*Sin
[e + f*x]])/((b*c - a*d)*(c^2 + d^2)*f)
Rule 3611
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c/(b*f))
*Log[RemoveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]
Rule 3732
Int[((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/(((a_) + (b_.)*tan[(e_.) + (f_.)
*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(a*(A*c - c*C + B*d) + b*(B*c - A*d + C*d)
)*(x/((a^2 + b^2)*(c^2 + d^2))), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/((b*c - a*d)*(a^2 + b^2)), Int[(b - a*Tan[
e + f*x])/(a + b*Tan[e + f*x]), x], x] - Dist[(c^2*C - B*c*d + A*d^2)/((b*c - a*d)*(c^2 + d^2)), Int[(d - c*Ta
n[e + f*x])/(c + d*Tan[e + f*x]), x], x]) /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ
[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {(b B c-b (A-C) d+a (A c-c C+B d)) x}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {\left (A b^2-a (b B-a C)\right ) \int \frac {b-a \tan (e+f x)}{a+b \tan (e+f x)} \, dx}{\left (a^2+b^2\right ) (b c-a d)}-\frac {\left (c^2 C-B c d+A d^2\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{(b c-a d) \left (c^2+d^2\right )} \\ & = \frac {(b B c-b (A-C) d+a (A c-c C+B d)) x}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {\left (A b^2-a (b B-a C)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{\left (a^2+b^2\right ) (b c-a d) f}-\frac {\left (c^2 C-B c d+A d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{(b c-a d) \left (c^2+d^2\right ) f} \\
\end{align*}
Mathematica [A] (verified)
Time = 1.62 (sec) , antiderivative size = 313, normalized size of antiderivative = 1.90
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=-\frac {\frac {\left (A b c-a B c-b c C+a A d+b B d-a C d+\frac {\sqrt {-b^2} (b B c+b (-A+C) d+a (A c-c C+B d))}{b}\right ) \log \left (\sqrt {-b^2}-b \tan (e+f x)\right )}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {2 \left (A b^2+a (-b B+a C)\right ) \log (a+b \tan (e+f x))}{\left (a^2+b^2\right ) (-b c+a d)}+\frac {\left (A b c-a B c-b c C+a A d+b B d-a C d+\frac {b (b B c+b (-A+C) d+a (A c-c C+B d))}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (e+f x)\right )}{\left (a^2+b^2\right ) \left (c^2+d^2\right )}+\frac {2 \left (c^2 C-B c d+A d^2\right ) \log (c+d \tan (e+f x))}{(b c-a d) \left (c^2+d^2\right )}}{2 f}
\]
[In]
Integrate[(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2)/((a + b*Tan[e + f*x])*(c + d*Tan[e + f*x])),x]
[Out]
-1/2*(((A*b*c - a*B*c - b*c*C + a*A*d + b*B*d - a*C*d + (Sqrt[-b^2]*(b*B*c + b*(-A + C)*d + a*(A*c - c*C + B*d
)))/b)*Log[Sqrt[-b^2] - b*Tan[e + f*x]])/((a^2 + b^2)*(c^2 + d^2)) + (2*(A*b^2 + a*(-(b*B) + a*C))*Log[a + b*T
an[e + f*x]])/((a^2 + b^2)*(-(b*c) + a*d)) + ((A*b*c - a*B*c - b*c*C + a*A*d + b*B*d - a*C*d + (b*(b*B*c + b*(
-A + C)*d + a*(A*c - c*C + B*d)))/Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[e + f*x]])/((a^2 + b^2)*(c^2 + d^2)) + (2
*(c^2*C - B*c*d + A*d^2)*Log[c + d*Tan[e + f*x]])/((b*c - a*d)*(c^2 + d^2)))/f
Maple [A] (verified)
Time = 0.28 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.19
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {-\frac {\left (A \,b^{2}-B a b +C \,a^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a d -b c \right ) \left (a^{2}+b^{2}\right )}+\frac {\frac {\left (-A a d -A b c +B a c -b d B +C a d +C b c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A a c -A b d +B a d +B b c -C a c +C b d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right ) \left (c^{2}+d^{2}\right )}+\frac {\left (A \,d^{2}-B c d +c^{2} C \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (a d -b c \right ) \left (c^{2}+d^{2}\right )}}{f}\) |
\(197\) |
default |
\(\frac {-\frac {\left (A \,b^{2}-B a b +C \,a^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a d -b c \right ) \left (a^{2}+b^{2}\right )}+\frac {\frac {\left (-A a d -A b c +B a c -b d B +C a d +C b c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A a c -A b d +B a d +B b c -C a c +C b d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right ) \left (c^{2}+d^{2}\right )}+\frac {\left (A \,d^{2}-B c d +c^{2} C \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (a d -b c \right ) \left (c^{2}+d^{2}\right )}}{f}\) |
\(197\) |
norman |
\(\frac {\left (A a c -A b d +B a d +B b c -C a c +C b d \right ) x}{\left (a^{2}+b^{2}\right ) \left (c^{2}+d^{2}\right )}+\frac {\left (A \,d^{2}-B c d +c^{2} C \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}-\frac {\left (A \,b^{2}-B a b +C \,a^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a d -b c \right ) \left (a^{2}+b^{2}\right ) f}-\frac {\left (A a d +A b c -B a c +b d B -C a d -C b c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{2}+b^{2}\right ) \left (c^{2}+d^{2}\right )}\) |
\(220\) |
parallelrisch |
\(-\frac {-2 C \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} c^{2}-2 C \ln \left (c +d \tan \left (f x +e \right )\right ) b^{2} c^{2}+A \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2} d^{2}-A \ln \left (1+\tan \left (f x +e \right )^{2}\right ) b^{2} c^{2}+2 A \ln \left (a +b \tan \left (f x +e \right )\right ) b^{2} c^{2}+2 A \ln \left (a +b \tan \left (f x +e \right )\right ) b^{2} d^{2}-2 A \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} d^{2}-2 A \ln \left (c +d \tan \left (f x +e \right )\right ) b^{2} d^{2}-C \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2} d^{2}+C \ln \left (1+\tan \left (f x +e \right )^{2}\right ) b^{2} c^{2}+2 C \ln \left (a +b \tan \left (f x +e \right )\right ) a^{2} c^{2}+2 C \ln \left (a +b \tan \left (f x +e \right )\right ) a^{2} d^{2}-2 A x \,a^{2} c d f +2 A x a b \,c^{2} f +2 A x a b \,d^{2} f -2 A x \,b^{2} c d f +2 C x \,a^{2} c d f -2 C x a b \,c^{2} f -2 C x a b \,d^{2} f +2 C x \,b^{2} c d f -2 B x \,a^{2} d^{2} f +2 B x \,b^{2} c^{2} f -B \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2} c d +B \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a b \,c^{2}+B \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a b \,d^{2}-B \ln \left (1+\tan \left (f x +e \right )^{2}\right ) b^{2} c d -2 B \ln \left (a +b \tan \left (f x +e \right )\right ) a b \,c^{2}-2 B \ln \left (a +b \tan \left (f x +e \right )\right ) a b \,d^{2}+2 B \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} c d +2 B \ln \left (c +d \tan \left (f x +e \right )\right ) b^{2} c d}{2 \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right ) \left (a^{2}+b^{2}\right ) f}\) |
\(533\) |
risch |
\(-\frac {2 i B a b x}{a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c}-\frac {x A}{i a d +i b c -a c +b d}+\frac {x C}{i a d +i b c -a c +b d}-\frac {2 i c^{2} C e}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}+\frac {2 i A \,b^{2} x}{a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c}-\frac {2 i c^{2} C x}{a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}}-\frac {2 i B a b e}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}+\frac {2 i B c d e}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}-\frac {2 i A \,d^{2} e}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}-\frac {2 i A \,d^{2} x}{a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}}+\frac {i x B}{i a d +i b c -a c +b d}+\frac {2 i C \,a^{2} x}{a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c}+\frac {2 i C \,a^{2} e}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}+\frac {2 i B c d x}{a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}}+\frac {2 i A \,b^{2} e}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) A \,b^{2}}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) B a b}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i b +a}{i b -a}\right ) C \,a^{2}}{f \left (a^{3} d -a^{2} b c +a \,b^{2} d -b^{3} c \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) A \,d^{2}}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) B c d}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c^{2} C}{f \left (a \,c^{2} d +a \,d^{3}-b \,c^{3}-b c \,d^{2}\right )}\) |
\(893\) |
| | |
|
|
|
[In]
int((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))/(c+d*tan(f*x+e)),x,method=_RETURNVERBOSE)
[Out]
1/f*(-(A*b^2-B*a*b+C*a^2)/(a*d-b*c)/(a^2+b^2)*ln(a+b*tan(f*x+e))+1/(a^2+b^2)/(c^2+d^2)*(1/2*(-A*a*d-A*b*c+B*a*
c-B*b*d+C*a*d+C*b*c)*ln(1+tan(f*x+e)^2)+(A*a*c-A*b*d+B*a*d+B*b*c-C*a*c+C*b*d)*arctan(tan(f*x+e)))+(A*d^2-B*c*d
+C*c^2)/(a*d-b*c)/(c^2+d^2)*ln(c+d*tan(f*x+e)))
Fricas [A] (verification not implemented)
none
Time = 0.46 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.82
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {2 \, {\left ({\left ({\left (A - C\right )} a b + B b^{2}\right )} c^{2} - {\left ({\left (A - C\right )} a^{2} + {\left (A - C\right )} b^{2}\right )} c d - {\left (B a^{2} - {\left (A - C\right )} a b\right )} d^{2}\right )} f x + {\left ({\left (C a^{2} - B a b + A b^{2}\right )} c^{2} + {\left (C a^{2} - B a b + A b^{2}\right )} d^{2}\right )} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left ({\left (C a^{2} + C b^{2}\right )} c^{2} - {\left (B a^{2} + B b^{2}\right )} c d + {\left (A a^{2} + A b^{2}\right )} d^{2}\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, {\left ({\left (a^{2} b + b^{3}\right )} c^{3} - {\left (a^{3} + a b^{2}\right )} c^{2} d + {\left (a^{2} b + b^{3}\right )} c d^{2} - {\left (a^{3} + a b^{2}\right )} d^{3}\right )} f}
\]
[In]
integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))/(c+d*tan(f*x+e)),x, algorithm="fricas")
[Out]
1/2*(2*(((A - C)*a*b + B*b^2)*c^2 - ((A - C)*a^2 + (A - C)*b^2)*c*d - (B*a^2 - (A - C)*a*b)*d^2)*f*x + ((C*a^2
- B*a*b + A*b^2)*c^2 + (C*a^2 - B*a*b + A*b^2)*d^2)*log((b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) + a^2)/(tan(
f*x + e)^2 + 1)) - ((C*a^2 + C*b^2)*c^2 - (B*a^2 + B*b^2)*c*d + (A*a^2 + A*b^2)*d^2)*log((d^2*tan(f*x + e)^2 +
2*c*d*tan(f*x + e) + c^2)/(tan(f*x + e)^2 + 1)))/(((a^2*b + b^3)*c^3 - (a^3 + a*b^2)*c^2*d + (a^2*b + b^3)*c*
d^2 - (a^3 + a*b^2)*d^3)*f)
Sympy [C] (verification not implemented)
Result contains complex when optimal does not.
Time = 34.90 (sec) , antiderivative size = 24052, normalized size of antiderivative = 145.77
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\text {Too large to display}
\]
[In]
integrate((A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*tan(f*x+e))/(c+d*tan(f*x+e)),x)
[Out]
Piecewise(((2*A*c*d*f*x/(2*c**2*d*f + 2*d**3*f) + 2*A*d**2*log(c/d + tan(e + f*x))/(2*c**2*d*f + 2*d**3*f) - A
*d**2*log(tan(e + f*x)**2 + 1)/(2*c**2*d*f + 2*d**3*f) - 2*B*c*d*log(c/d + tan(e + f*x))/(2*c**2*d*f + 2*d**3*
f) + B*c*d*log(tan(e + f*x)**2 + 1)/(2*c**2*d*f + 2*d**3*f) + 2*B*d**2*f*x/(2*c**2*d*f + 2*d**3*f) + 2*C*c**2*
log(c/d + tan(e + f*x))/(2*c**2*d*f + 2*d**3*f) - 2*C*c*d*f*x/(2*c**2*d*f + 2*d**3*f) + C*d**2*log(tan(e + f*x
)**2 + 1)/(2*c**2*d*f + 2*d**3*f))/a, Eq(b, 0)), ((2*A*a*b*f*x/(2*a**2*b*f + 2*b**3*f) + 2*A*b**2*log(a/b + ta
n(e + f*x))/(2*a**2*b*f + 2*b**3*f) - A*b**2*log(tan(e + f*x)**2 + 1)/(2*a**2*b*f + 2*b**3*f) - 2*B*a*b*log(a/
b + tan(e + f*x))/(2*a**2*b*f + 2*b**3*f) + B*a*b*log(tan(e + f*x)**2 + 1)/(2*a**2*b*f + 2*b**3*f) + 2*B*b**2*
f*x/(2*a**2*b*f + 2*b**3*f) + 2*C*a**2*log(a/b + tan(e + f*x))/(2*a**2*b*f + 2*b**3*f) - 2*C*a*b*f*x/(2*a**2*b
*f + 2*b**3*f) + C*b**2*log(tan(e + f*x)**2 + 1)/(2*a**2*b*f + 2*b**3*f))/c, Eq(d, 0)), (I*A*c**2*f*x*tan(e +
f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e
+ f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + A*c**2*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I
*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d*
*3*f*tan(e + f*x) + 2*b*d**3*f) + I*A*c**2/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*
x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*A
*c*d*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2
*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*I*A*c*d*f*x/(2*b*c**3*
f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b
*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*A*d**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I
*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d*
*3*f*tan(e + f*x) + 2*b*d**3*f) + A*d**2*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e +
f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2
*A*d**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e +
f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2
*I*A*d**2*log(c/d + tan(e + f*x))/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*
c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + A*d**2*log(t
an(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c
**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*A*d**2*log(
tan(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*
b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*A*d**2/(2*b*c**3*f*tan(
e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**
2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + B*c**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*
f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan
(e + f*x) + 2*b*d**3*f) - I*B*c**2*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) +
2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*c**2/
(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*
x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*B*c*d*log(c/d + tan(e + f*x))*tan(e + f*x)/(
2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x
) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*I*B*c*d*log(c/d + tan(e + f*x))/(2*b*c**3*f*t
an(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*
d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*c*d*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan
(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d*
*2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*B*c*d*log(tan(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) - 2
*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*
d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*d**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c*
*2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) +
2*b*d**3*f) + I*B*d**2*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*
f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*d**2/(2*b*c**3*f*
tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c
*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*C*c**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b
*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3
*f*tan(e + f*x) + 2*b*d**3*f) + C*c**2*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*
x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*C
*c**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*
x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*I
*C*c**2*log(c/d + tan(e + f*x))/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c*
*2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + C*c**2*log(tan
(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**
2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*C*c**2*log(ta
n(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*
c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*C*c**2/(2*b*c**3*f*tan(e
+ f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*
f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*C*c*d*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f
+ 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(
e + f*x) + 2*b*d**3*f) - 2*I*C*c*d*f*x/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) +
2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*C*d**
2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*
c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + C*d**2*f*x/(2*b*c**3*f*tan(
e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**
2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*C*d**2/(2*b*c**3*f*tan(e + f*x) - 2*I*b*c**3*f + 2*I*b*c**2*
d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) - 2*I*b*c*d**2*f + 2*I*b*d**3*f*tan(e + f*x) + 2*b
*d**3*f), Eq(a, -I*b)), (-I*A*c**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*t
an(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3
*f) + A*c**2*f*x/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*
d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*A*c**2/(2*b*c**3*f*tan(e +
f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f
- 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*A*c*d*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f -
2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e
+ f*x) + 2*b*d**3*f) - 2*I*A*c*d*f*x/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2
*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*A*d**2*
f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*
d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + A*d**2*f*x/(2*b*c**3*f*tan(e
+ f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*
f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*A*d**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**3*f*tan(e
+ f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*
f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*I*A*d**2*log(c/d + tan(e + f*x))/(2*b*c**3*f*tan(e + f*x) + 2*
I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d
**3*f*tan(e + f*x) + 2*b*d**3*f) + A*d**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I
*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d*
*3*f*tan(e + f*x) + 2*b*d**3*f) + I*A*d**2*log(tan(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f -
2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e +
f*x) + 2*b*d**3*f) - I*A*d**2/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**
2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + B*c**2*f*x*tan(
e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*t
an(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*B*c**2*f*x/(2*b*c**3*f*tan(e + f*x)
+ 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*
I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*c**2/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e
+ f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) +
2*B*c*d*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e +
f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) +
2*I*B*c*d*log(c/d + tan(e + f*x))/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*
c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*c*d*log(ta
n(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c*
*2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*B*c*d*log(ta
n(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*
c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - B*d**2*f*x*tan(e + f*x)/(2*
b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x)
+ 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*B*d**2*f*x/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**
3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*t
an(e + f*x) + 2*b*d**3*f) - B*d**2/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b
*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*C*c**2*f*
x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d*
*2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + C*c**2*f*x/(2*b*c**3*f*tan(e +
f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f
- 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*C*c**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**3*f*tan(e +
f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f
- 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - 2*I*C*c**2*log(c/d + tan(e + f*x))/(2*b*c**3*f*tan(e + f*x) + 2*I*
b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**
3*f*tan(e + f*x) + 2*b*d**3*f) + C*c**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b
*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3
*f*tan(e + f*x) + 2*b*d**3*f) + I*C*c**2*log(tan(e + f*x)**2 + 1)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*
I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f
*x) + 2*b*d**3*f) + I*C*c**2/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*
d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*C*c*d*f*x*tan(e
+ f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*ta
n(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + 2*I*C*c*d*f*x/(2*b*c**3*f*tan(e + f*x)
+ 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*
I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) - I*C*d**2*f*x*tan(e + f*x)/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*
I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f
*x) + 2*b*d**3*f) + C*d**2*f*x/(2*b*c**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**
2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f) + I*C*d**2/(2*b*c
**3*f*tan(e + f*x) + 2*I*b*c**3*f - 2*I*b*c**2*d*f*tan(e + f*x) + 2*b*c**2*d*f + 2*b*c*d**2*f*tan(e + f*x) + 2
*I*b*c*d**2*f - 2*I*b*d**3*f*tan(e + f*x) + 2*b*d**3*f), Eq(a, I*b)), (2*A*c**3*d*f*x/(2*b*c**5*f + 2*b*c**4*d
*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 2
*A*c**2*d**2*f*x*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(
e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 4*A*c**2*d**2*log(c/d + tan(e + f*x))/(2*b*c**5*f + 2*b*c
**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)
) - 2*A*c**2*d**2*log(tan(e + f*x)**2 + 1)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**
2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*A*c**2*d**2/(2*b*c**5*f + 2*b*c**4*d*f*tan
(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*A*c*d
**3*f*x/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*
f + 2*b*d**5*f*tan(e + f*x)) + 4*A*c*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(
e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*A*c*d*
*3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*
d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*A*d**4*f*x*tan(e + f*x)/(2*b*c**5*f + 2*b*c*
*4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x))
- 2*A*d**4/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d
**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*B*c**3*d*log(c/d + tan(e + f*x))/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x)
+ 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + B*c**3*d*log(tan(
e + f*x)**2 + 1)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*
b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 2*B*c**3*d/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f +
4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 4*B*c**2*d**2*f*x/(2*b*c**5*f + 2*b*
c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x
)) - 2*B*c**2*d**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**
2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + B*c**2*d**2*log(tan(e + f*x)**2
+ 1)*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) +
2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 4*B*c*d**3*f*x*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x)
+ 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 2*B*c*d**3*log(c/
d + tan(e + f*x))/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2
*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - B*c*d**3*log(tan(e + f*x)**2 + 1)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e +
f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 2*B*c*d**3/(
2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d
**5*f*tan(e + f*x)) + 2*B*d**4*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) +
4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - B*d**4*log(tan(e +
f*x)**2 + 1)*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e +
f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*C*c**4/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d
**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*C*c**3*d*f*x/(2*b*c**5*f +
2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e +
f*x)) - 2*C*c**2*d**2*f*x*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d
**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 4*C*c**2*d**2*log(c/d + tan(e + f*x))/(2*b*c**5
*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*ta
n(e + f*x)) + 2*C*c**2*d**2*log(tan(e + f*x)**2 + 1)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f
+ 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 2*C*c**2*d**2/(2*b*c**5*f + 2*b*c*
*4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x))
+ 2*C*c*d**3*f*x/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2
*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) - 4*C*c*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*b*c**5*f + 2*b*c**
4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x))
+ 2*C*c*d**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*b*c**5*f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f +
4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan(e + f*x)) + 2*C*d**4*f*x*tan(e + f*x)/(2*b*c**5*
f + 2*b*c**4*d*f*tan(e + f*x) + 4*b*c**3*d**2*f + 4*b*c**2*d**3*f*tan(e + f*x) + 2*b*c*d**4*f + 2*b*d**5*f*tan
(e + f*x)), Eq(a, b*c/d)), (I*A*a**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f
*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3
*d*f) + A*a**2*f*x/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*
b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*A*a**2/(2*a**3*d*f*tan(e
+ f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*
f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*A*a*b*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f
+ 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(
e + f*x) + 2*b**3*d*f) + 2*I*A*a*b*f*x/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) +
2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*A*b**
2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*
b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + A*b**2*f*x/(2*a**3*d*f*tan(
e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*
d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*A*b**2*log(a/b + tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan(
e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*
d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + 2*I*A*b**2*log(a/b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) -
2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b
**3*d*f*tan(e + f*x) + 2*b**3*d*f) + A*b**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2
*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b*
*3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*A*b**2*log(tan(e + f*x)**2 + 1)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f
+ 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e
+ f*x) + 2*b**3*d*f) + I*A*b**2/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**
2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + B*a**2*f*x*ta
n(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f
*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*B*a**2*f*x/(2*a**3*d*f*tan(e + f*
x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f +
2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*a**2/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(
e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f)
+ 2*B*a*b*log(a/b + tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e
+ f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f)
- 2*I*B*a*b*log(a/b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*
a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*a*b*log(
tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a*
*2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*B*a*b*log(
tan(e + f*x)**2 + 1)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*
a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*b**2*f*x*tan(e + f*x)/(
2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x
) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*B*b**2*f*x/(2*a**3*d*f*tan(e + f*x) - 2*I*a**
3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f
*tan(e + f*x) + 2*b**3*d*f) - B*b**2/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2
*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*C*a**2*
f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b*
*2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + C*a**2*f*x/(2*a**3*d*f*tan(e
+ f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*
f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*C*a**2*log(a/b + tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan(e
+ f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*
f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + 2*I*C*a**2*log(a/b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) - 2*
I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**
3*d*f*tan(e + f*x) + 2*b**3*d*f) + C*a**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I
*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3
*d*f*tan(e + f*x) + 2*b**3*d*f) - I*C*a**2*log(tan(e + f*x)**2 + 1)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f +
2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e +
f*x) + 2*b**3*d*f) - I*C*a**2/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*
b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + 2*C*a*b*f*x*tan
(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*
tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*I*C*a*b*f*x/(2*a**3*d*f*tan(e + f*
x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f +
2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*C*b**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f +
2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e +
f*x) + 2*b**3*d*f) + C*b**2*f*x/(2*a**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**
2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) - 2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*C*b**2/(2*a
**3*d*f*tan(e + f*x) - 2*I*a**3*d*f + 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) -
2*I*a*b**2*d*f + 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f), Eq(c, -I*d)), (-I*A*a**2*f*x*tan(e + f*x)/(2*a**3*d
*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*
a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + A*a**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*
I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f
*x) + 2*b**3*d*f) - I*A*a**2/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*
d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*A*a*b*f*x*tan(e
+ f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*ta
n(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*I*A*a*b*f*x/(2*a**3*d*f*tan(e + f*x)
+ 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*
I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*A*b**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*
I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f
*x) + 2*b**3*d*f) + A*b**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*
b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*A*b**2*log(a/
b + tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*
b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*I*A*b**2*log(
a/b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a
*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + A*b**2*log(tan(e + f*x)**2
+ 1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*
b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*A*b**2*log(tan(e + f*x)**
2 + 1)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan
(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*A*b**2/(2*a**3*d*f*tan(e + f*x) + 2*I
*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3
*d*f*tan(e + f*x) + 2*b**3*d*f) + B*a**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b
*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*
b**3*d*f) + I*B*a**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f
+ 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*a**2/(2*a**3*d*f*ta
n(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**
2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + 2*B*a*b*log(a/b + tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan
(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2
*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + 2*I*B*a*b*log(a/b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) +
2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b
**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*a*b*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*
I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**
3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*B*a*b*log(tan(e + f*x)**2 + 1)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f -
2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e +
f*x) + 2*b**3*d*f) - B*b**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e +
f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) -
I*B*b**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d
*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - B*b**2/(2*a**3*d*f*tan(e + f*x) +
2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*
b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*C*a**2*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*
a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x
) + 2*b**3*d*f) + C*a**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*
d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*C*a**2*log(a/b
+ tan(e + f*x))*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*
d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - 2*I*C*a**2*log(a/
b + tan(e + f*x))/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b
**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + C*a**2*log(tan(e + f*x)**2 +
1)*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b*
*2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*C*a**2*log(tan(e + f*x)**2
+ 1)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e
+ f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + I*C*a**2/(2*a**3*d*f*tan(e + f*x) + 2*I*a
**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d
*f*tan(e + f*x) + 2*b**3*d*f) + 2*C*a*b*f*x*tan(e + f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*
d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b
**3*d*f) + 2*I*C*a*b*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f
+ 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) - I*C*b**2*f*x*tan(e +
f*x)/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e
+ f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f) + C*b**2*f*x/(2*a**3*d*f*tan(e + f*x) + 2*I
*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3
*d*f*tan(e + f*x) + 2*b**3*d*f) + I*C*b**2/(2*a**3*d*f*tan(e + f*x) + 2*I*a**3*d*f - 2*I*a**2*b*d*f*tan(e + f*
x) + 2*a**2*b*d*f + 2*a*b**2*d*f*tan(e + f*x) + 2*I*a*b**2*d*f - 2*I*b**3*d*f*tan(e + f*x) + 2*b**3*d*f), Eq(c
, I*d)), (x*(A + B*tan(e) + C*tan(e)**2)/((a + b*tan(e))*(c + d*tan(e))), Eq(f, 0)), (2*A*a**2*c*d*f*x/(2*a**3
*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3
*c**3*f - 2*b**3*c*d**2*f) + 2*A*a**2*d**2*log(c/d + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b
*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - A*a**2*
d**2*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**
2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*A*a*b*c**2*f*x/(2*a**3*c**2*d*f + 2*a**3*d
**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d
**2*f) - 2*A*a*b*d**2*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c*
*2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*A*b**2*c**2*log(a/b + tan(e + f*x))/(2*a**3*c*
*2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c*
*3*f - 2*b**3*c*d**2*f) + A*b**2*c**2*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**
3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + 2*A*b**2*c*
d*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d*
*3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*A*b**2*d**2*log(a/b + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3
*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2
*f) + 2*A*b**2*d**2*log(c/d + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d*
*2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*B*a**2*c*d*log(c/d + tan(e +
f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d
**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + B*a**2*c*d*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*
f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*
f) + 2*B*a**2*d**2*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*
d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + 2*B*a*b*c**2*log(a/b + tan(e + f*x))/(2*a**3*c**2*d
*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f
- 2*b**3*c*d**2*f) - B*a*b*c**2*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f -
2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + 2*B*a*b*d**2*log
(a/b + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*
f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - B*a*b*d**2*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f
+ 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f -
2*b**3*c*d**2*f) - 2*B*b**2*c**2*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f +
2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*B*b**2*c*d*log(c/d + tan(e + f*x))/
(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f -
2*b**3*c**3*f - 2*b**3*c*d**2*f) + B*b**2*c*d*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a
**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*
C*a**2*c**2*log(a/b + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2
*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + 2*C*a**2*c**2*log(c/d + tan(e + f*x))/
(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f -
2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*C*a**2*c*d*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a*
*2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*C*a**2*d**2*log(a/b
+ tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f +
2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + C*a**2*d**2*log(tan(e + f*x)**2 + 1)/(2*a**3*c**2*d*f + 2
*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b
**3*c*d**2*f) + 2*C*a*b*c**2*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*
b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) + 2*C*a*b*d**2*f*x/(2*a**3*c**2*d*f + 2*a**
3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*
c*d**2*f) + 2*C*b**2*c**2*log(c/d + tan(e + f*x))/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*
b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - C*b**2*c**2*log(tan(e +
f*x)**2 + 1)/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*
b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f) - 2*C*b**2*c*d*f*x/(2*a**3*c**2*d*f + 2*a**3*d**3*f - 2*a**2*b*
c**3*f - 2*a**2*b*c*d**2*f + 2*a*b**2*c**2*d*f + 2*a*b**2*d**3*f - 2*b**3*c**3*f - 2*b**3*c*d**2*f), True))
Maxima [A] (verification not implemented)
none
Time = 0.56 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.47
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {\frac {2 \, {\left ({\left ({\left (A - C\right )} a + B b\right )} c + {\left (B a - {\left (A - C\right )} b\right )} d\right )} {\left (f x + e\right )}}{{\left (a^{2} + b^{2}\right )} c^{2} + {\left (a^{2} + b^{2}\right )} d^{2}} + \frac {2 \, {\left (C a^{2} - B a b + A b^{2}\right )} \log \left (b \tan \left (f x + e\right ) + a\right )}{{\left (a^{2} b + b^{3}\right )} c - {\left (a^{3} + a b^{2}\right )} d} - \frac {2 \, {\left (C c^{2} - B c d + A d^{2}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{b c^{3} - a c^{2} d + b c d^{2} - a d^{3}} + \frac {{\left ({\left (B a - {\left (A - C\right )} b\right )} c - {\left ({\left (A - C\right )} a + B b\right )} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{{\left (a^{2} + b^{2}\right )} c^{2} + {\left (a^{2} + b^{2}\right )} d^{2}}}{2 \, f}
\]
[In]
integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))/(c+d*tan(f*x+e)),x, algorithm="maxima")
[Out]
1/2*(2*(((A - C)*a + B*b)*c + (B*a - (A - C)*b)*d)*(f*x + e)/((a^2 + b^2)*c^2 + (a^2 + b^2)*d^2) + 2*(C*a^2 -
B*a*b + A*b^2)*log(b*tan(f*x + e) + a)/((a^2*b + b^3)*c - (a^3 + a*b^2)*d) - 2*(C*c^2 - B*c*d + A*d^2)*log(d*t
an(f*x + e) + c)/(b*c^3 - a*c^2*d + b*c*d^2 - a*d^3) + ((B*a - (A - C)*b)*c - ((A - C)*a + B*b)*d)*log(tan(f*x
+ e)^2 + 1)/((a^2 + b^2)*c^2 + (a^2 + b^2)*d^2))/f
Giac [A] (verification not implemented)
none
Time = 0.60 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.62
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {\frac {2 \, {\left (A a c - C a c + B b c + B a d - A b d + C b d\right )} {\left (f x + e\right )}}{a^{2} c^{2} + b^{2} c^{2} + a^{2} d^{2} + b^{2} d^{2}} + \frac {{\left (B a c - A b c + C b c - A a d + C a d - B b d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{2} c^{2} + b^{2} c^{2} + a^{2} d^{2} + b^{2} d^{2}} + \frac {2 \, {\left (C a^{2} b - B a b^{2} + A b^{3}\right )} \log \left ({\left | b \tan \left (f x + e\right ) + a \right |}\right )}{a^{2} b^{2} c + b^{4} c - a^{3} b d - a b^{3} d} - \frac {2 \, {\left (C c^{2} d - B c d^{2} + A d^{3}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{b c^{3} d - a c^{2} d^{2} + b c d^{3} - a d^{4}}}{2 \, f}
\]
[In]
integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))/(c+d*tan(f*x+e)),x, algorithm="giac")
[Out]
1/2*(2*(A*a*c - C*a*c + B*b*c + B*a*d - A*b*d + C*b*d)*(f*x + e)/(a^2*c^2 + b^2*c^2 + a^2*d^2 + b^2*d^2) + (B*
a*c - A*b*c + C*b*c - A*a*d + C*a*d - B*b*d)*log(tan(f*x + e)^2 + 1)/(a^2*c^2 + b^2*c^2 + a^2*d^2 + b^2*d^2) +
2*(C*a^2*b - B*a*b^2 + A*b^3)*log(abs(b*tan(f*x + e) + a))/(a^2*b^2*c + b^4*c - a^3*b*d - a*b^3*d) - 2*(C*c^2
*d - B*c*d^2 + A*d^3)*log(abs(d*tan(f*x + e) + c))/(b*c^3*d - a*c^2*d^2 + b*c*d^3 - a*d^4))/f
Mupad [B] (verification not implemented)
Time = 20.81 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.19
\[
\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))} \, dx=\frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (C\,c^2-B\,c\,d+A\,d^2\right )}{f\,\left (a\,d-b\,c\right )\,\left (c^2+d^2\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (C-A+B\,1{}\mathrm {i}\right )}{2\,f\,\left (a\,c\,1{}\mathrm {i}+a\,d+b\,c-b\,d\,1{}\mathrm {i}\right )}-\frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (C\,a^2-B\,a\,b+A\,b^2\right )}{f\,\left (d\,a^3-c\,a^2\,b+d\,a\,b^2-c\,b^3\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (A-C+B\,1{}\mathrm {i}\right )}{2\,f\,\left (a\,d-a\,c\,1{}\mathrm {i}+b\,c+b\,d\,1{}\mathrm {i}\right )}
\]
[In]
int((A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))*(c + d*tan(e + f*x))),x)
[Out]
(log(tan(e + f*x) + 1i)*(B*1i - A + C))/(2*f*(a*c*1i + a*d + b*c - b*d*1i)) - (log(tan(e + f*x) - 1i)*(A + B*1
i - C))/(2*f*(a*d - a*c*1i + b*c + b*d*1i)) - (log(a + b*tan(e + f*x))*(A*b^2 + C*a^2 - B*a*b))/(f*(a^3*d - b^
3*c - a^2*b*c + a*b^2*d)) + (log(c + d*tan(e + f*x))*(A*d^2 + C*c^2 - B*c*d))/(f*(a*d - b*c)*(c^2 + d^2))